package consolemir;

public abstract class Option {
	private char hotKey;
	private String description;
	
	public Option(char hotKey, String description) {
		this.hotKey = hotKey;
		this.description = description;
	}
	
	public abstract Object execute(Object o);
	
	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append(this.hotKey);
		sb.append(". ");
		sb.append(this.description);
		return sb.toString();
	}

	public boolean matches(char c) {
		return this.getHotKey() == c;
	}

	public char getHotKey() {
		return this.hotKey;
	}
}
